#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <iostream>
#include <string>
using std::cout;
using std::endl;
using std::string;

void test1(){
    string content;
    int fd = ::open("./file.txt",O_RDONLY);
    char buf[6] = {0};
    int readedNum;
    
    do{
        readedNum = read(fd,buf,sizeof(buf));
        content.append(buf);
        ::bzero(buf,sizeof(buf));
    }while(readedNum);

    cout<<content;
    return ;
}


int main()
{
    test1();
    return 0;
}

